package com.system.appointment.repository;

import com.system.appointment.bean.Appointment;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @className: AppointmentRepository
 * @description: 预约单数据库访问接口
 * @author: Li Chuanwei
 * @date: 2023/11/26 15:32
 * @Company: Copyright [日期] by [作者或个人]
 **/

public interface AppointmentRepository extends JpaRepository<Appointment, Integer> {
    Appointment findByPatientId(int patientId);

    List<Appointment> findAllByState(Integer state);
    List<Appointment> findAllByPatientId(Integer patientId);
    Appointment findByAppointmentNumber(String appointmentNumber);
}
